//从文件中读取数据输出最大值，最小值，平均值
let rf=require("fs");  
let data=rf.readFileSync("./2/2-10data.txt","utf-8"); 
let dataArr = data.split(' ');
dataArr = dataArr.sort();
let min = dataArr[0];
let max = dataArr[dataArr.length-1];
function sumArr(target){
    let sum = 0;
    for(let key in target){
        sum+=parseFloat(target[key]);
    }
    return sum;
}
let sum = sumArr(dataArr);
let arg = sum/(dataArr.length);
console.log(data);
console.log(min);  
console.log(max);  
console.log(sum);  
console.log(arg);  
